﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PasswordGenerator
{
    internal abstract class CharacterProfile
    {
        protected CharacterType CharacterType { get; set; }
        internal List<ASCIIRange> CharacterRange { get; set; }
    }

    /// <summary>
    /// Represent Upper Case Characters in ASCII table.
    /// </summary>
    internal class UpperCharacterProfile : CharacterProfile
    {
        public UpperCharacterProfile()
        {
            CharacterType = CharacterType.UpperCaseCharacter;
            CharacterRange = new List<ASCIIRange>();
            CharacterRange.Add(new ASCIIRange(CharacterBound.UPPER_CHAR_LOWER_BOUND, CharacterBound.UPPER_CHAR_UPPER_BOUND));
        }
    }

    /// <summary>
    /// Represent Lower Case Characters in ASCII table.
    /// </summary>
    internal class LowerCharacterProfile : CharacterProfile
    {
        public LowerCharacterProfile()
        {
            CharacterType = CharacterType.LowerCaseCharacter;
            CharacterRange = new List<ASCIIRange>();
            CharacterRange.Add(new ASCIIRange(CharacterBound.LOWER_CHAR_LOWER_BOUND, CharacterBound.LOWER_CHAR_UPPER_BOUND));
        }
    }

    /// <summary>
    /// Represent Numeric Characters in ASCII table.
    /// </summary>
    internal class NumericCharacterProfile : CharacterProfile
    {
        public NumericCharacterProfile()
        {
            CharacterType = CharacterType.NumericCharacter;
            CharacterRange = new List<ASCIIRange>();
            CharacterRange.Add(new ASCIIRange(CharacterBound.NUMERIC_CHAR_LOWER_BOUND, CharacterBound.NUMERIC_CHAR_UPPER_BOUND));
        }
    }

    /// <summary>
    /// Represent Special Characters in ASCII table.
    /// </summary>
    internal class SpecialCharacterProfile : CharacterProfile
    {
        public SpecialCharacterProfile()
        {
            CharacterType = CharacterType.SpecialCharacter;
            CharacterRange = new List<ASCIIRange>();

            CharacterRange.Add(new ASCIIRange(33, 47));
            CharacterRange.Add(new ASCIIRange(58, 64));
            CharacterRange.Add(new ASCIIRange(91, 96));
            CharacterRange.Add(new ASCIIRange(123, 126));
        }
    }
}
